/*
 * @Author: shawnxiao
 * @Date: 2021-12-07 17:13:56
 * @LastEditTime: 2021-12-07 17:16:46
 * @FilePath: /vite-vue3-ts/src/common/utils/auth.ts
 */
import { removeCookie } from './cookie'
import { getTokenKeyForPage, getParentUrl } from './index'

export function loginOutCas() {
  // 注销登出
  removeCookie(getTokenKeyForPage())
  const url = getParentUrl()
  window.location.href = url || `${process.env.APP_LOGIN_URL}`
}
